<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]><html class="ie ie6 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
<!--[if IE 7]><html class="ie ie7 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
<!--[if IE 8]><html class="ie ie8 ie-lte9 ie-lte8 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
<!--[if IE 9]><html class="ie9 ie-lte9 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{=T.accepted_language or 'en'}}"> <!--<![endif]-->
<head>
  <meta charset="utf-8" />
  <!-- www.phpied.com/conditional-comments-block-downloads/ -->
  <!-- Always force latest IE rendering engine
       (even in intranet) & Chrome Frame
       Remove this if you use the .htaccess -->
  <!--[if IE]>
      <meta http-equiv="X-UA-Compatible" content="IE=edge{{=not request.is_local and ',chrome=1' or ''}}">
      <![endif]-->

  <title>{{=response.title or request.application}}</title>

  <!-- http://dev.w3.org/html5/markup/meta.name.html -->
  <meta name="application-name" content="{{=request.application}}" />

  <!-- Speaking of Google, don't forget to set your site up:
       http://google.com/webmasters -->
  <meta name="google-site-verification" content="" />

  <!--  Mobile Viewport Fix
        j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
        device-width: Occupy full width of the screen in its current orientation
        initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
        user-scalable = yes allows the user to zoom in -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
  <link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">

  <!-- All JavaScript at the bottom, except for Modernizr which enables
       HTML5 elements & feature detects -->
  <script src="{{=URL('static','js/modernizr.custom.js')}}"></script>

  <!-- include stylesheets -->
  {{
  response.files.append(URL('static','css/web2py.css'))
  response.files.append(URL('static','css/bootstrap.min.css'))
  response.files.append(URL('static','css/bootstrap-responsive.min.css'))
  response.files.append(URL('static','css/web2py_bootstrap.css'))
  response.files.append(URL('static','css/kvasir.css'))
  }}

  {{include 'web2py_ajax.html'}}
  {{include 'kvasir.functions.html'}}

  {{
  # using sidebars need to know what sidebar you want to use
  left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
  right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
  middle_columns = {0:'span12',1:'span9',2:'span6'}[
    (left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
  }}

  <noscript><link href="{{=URL('static', 'css/web2py_bootstrap_nojs.css')}}" rel="stylesheet" type="text/css" /></noscript>
  {{block head}}{{end}}
</head>

<body>
  <div class="wrap">
      <!-- Navbar ================================================== -->
      <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="flash">{{=response.flash or ''}}</div>
        <div class="navbar-inner">
          <div class="container">
            <!-- the next tag is necessary for bootstrap menus, do not remove -->
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
               {{=response.logo or ''}}
            <ul id="navbar" class="nav pull-right">{{='auth' in globals() and auth.navbar(mode="dropdown") or ''}}</ul>
            <div class="nav-collapse">
              {{is_mobile=request.user_agent().is_mobile}}
              {{if auth.is_logged_in():}}
              {{=MENU(response.menu, _class='mobile-menu nav' if is_mobile else 'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}
              {{pass}}
            </div><!--/.nav-collapse -->
          </div>
        </div>

      </div><!--/top navbar -->

      <div class="container-fluid">

        <!-- Masthead ================================================== -->
        <!--<header class="mastheader row" id="header">
              <div id="breadcrumb">
                <a href="{{=URL('default', 'index')}}"><i class="icon-home"></i>Home > {{=response.title or request.application}}</a>
              </div>
        </header>-->

        <section id="main" class="main row-fluid">
            {{if left_sidebar_enabled:}}
            <div class="span3 left-sidebar">
                {{block left_sidebar}}
                {{end}}
            </div>
            {{pass}}

            <div class="{{=middle_columns}}">
                {{block center}}
                {{include}}
                {{end}}
            </div>

            {{if right_sidebar_enabled:}}
            <div class="span3">
                {{block right_sidebar}}
                {{end}}
            </div>
            {{pass}}
        </section><!--/main-->

      </div> <!-- /container -->

      <div class="footer" id="footer">
        <div class="container">
          <p class="muted">Kvasir v{{=settings.version}} -=- <a href="https://github.com/KvasirSecurity/Kvasir" target="_blank">https://github.com/KvasirSecurity/Kvasir</a></p>
          {{block footer}}
          {{end}}
        </div>
      </div>

  </div> <!-- #wrap -->

  {{#include 'terminal.html'}}
  {{include 'hotkeys.html'}}

  <!-- The javascript =============================================
       (Placed at the end of the document so the pages load faster) -->
  <script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
  <script src="{{=URL('static','js/web2py_bootstrap.js')}}"></script>
  <script src="{{=URL('static','js/bootbox.min.js')}}"></script>
  <script src="{{=URL('static','js/kvasir.js')}}"></script>

  <!--[if lt IE 7 ]>
      <script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
      <script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
      <![endif]-->

</body>
</html>

